rs.open "select * from detail where classid="&66&" and verity=1",conn,1,3

来源:百度知道 编辑:UC知道 时间:2024/05/18 03:53:25
这条语名总提示语句未结束请大家帮帮忙,急用
现在又提示类型不匹配了

rs.open "select * from detail where classid="&66&" and verity=1",conn,1,3
这里的66本身不是一个变量。。所以不能直接这样用~~如果你想实现变量就rs.open "select * from detail where classid="&VAR&" and verity=1",conn,1,3~这里的VAR是一个整型。。如果classid是字符串 就用
rs.open "select * from detail where classid='"&VAR&"' and verity=1",conn,1,3
还有 如果你的字段verity 是字符串(即文本)类型 那么这里该写成 verity='1',这样才不会提示类型不匹配

classid='"&66&"' and verity=1"
这样试试

rs.open "select * from detail where classid='&66&' and verity=1",conn,1,3

="&66&" 这里 改成单引号 ='&66&'